package com.bjpowernode.service.impl;

import com.bjpowernode.entity.Task;
import com.bjpowernode.mapper.TaskMapper;
import com.bjpowernode.service.TaskService;

import java.util.List;

public class TaskServiceImpl implements TaskService {

    /**
     * 访问财务计划数据
     */
    private TaskMapper taskMapper;

    @Override
    public void insertTask(Task task) {
        this.taskMapper.insertTask(task);
    }

    @Override
    public List<Task> selectAllTasks() {
        return this.taskMapper.selectAllTasks();
    }

    @Override
    public void deleteTaskById(Integer id) {
        this.taskMapper.deleteTaskById(id);
    }

    @Override
    public Task selectTaskById(Integer id) {
        return this.taskMapper.selectTaskById(id);
    }

    @Override
    public void updateTaskById(Task task) {
        this.taskMapper.updateTaskById(task);
    }

    @Override
    public Integer selectTotalMoneyByMonth(Integer month) {
        return this.taskMapper.selectTotalMoneyByMonth(month);
    }

    @Override
    public List<Task> selectTasksByMonth(Integer month) {
        return this.taskMapper.selectTasksByMonth(month);
    }

    public TaskMapper getTaskMapper() {
        return taskMapper;
    }

    public void setTaskMapper(TaskMapper taskMapper) {
        this.taskMapper = taskMapper;
    }
}
